package com.example.demo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo.entity.LcdInfo;
import com.example.demo.service.LcdInfoService;
import com.example.demo.mapper.LcdInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 18364
* @description 针对表【lcd_info】的数据库操作Service实现
* @createDate 2025-01-08 11:38:10
*/
@Service
public class LcdInfoServiceImpl extends ServiceImpl<LcdInfoMapper, LcdInfo>
    implements LcdInfoService{
    @Autowired
    LcdInfoMapper lcdInfoMapper;

    @Override
    public List<LcdInfo> selcet() {
        return lcdInfoMapper.selectList(null);
    }

    @Override
    public LcdInfo selectbymodel(String productModel) {
        QueryWrapper<LcdInfo> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("productModel",productModel);
        queryWrapper.orderByDesc("id");
        return lcdInfoMapper.selectOne(queryWrapper);
    }
}




